<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>工单信息</title>
<meta name="description" content="拉勾数据">
<meta name="keywords" content="二手房 房产经济 房企 开发商 拉勾数据 IFS">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="icon" type="image/png" href="assets/i/favicon.png">
<link rel="apple-touch-icon-precomposed"
	href="assets/i/app-icon72x72@2x.png">
<meta name="apple-mobile-web-app-title" content="eosms for IFS" />
<link rel="stylesheet" href="assets/css/amazeui.min.css" />
<link rel="stylesheet" href="assets/css/admin.css">
</head>
<body>
	<!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
  以获得更好的体验！</p>
<![endif]-->

	<jsp:include page="/manage_header.do" flush="true" />

	<div class="am-cf admin-main">
		<!-- sidebar start -->
		<jsp:include page="/manage_tree.do" flush="true" ></jsp:include>
		<!-- sidebar end -->

		<!-- content start -->
		<div class="admin-content">

			<div class="am-cf am-padding">
				<div class="am-fl am-cf">
					<strong class="am-text-primary am-text-lg">工单</strong> / <small>businesslist</small>
				</div>
			</div>
			
			<form id="business_form" name="business_form" class="am-form"
				action="show_business.do" method="post">
				<input type="hidden" name="page_num" id="page_num" value="0">
<!-- 				<div class="am-tabs am-margin" data-am-tabs>
 -->					<ul class="am-tabs-nav am-nav am-nav-tabs">
						<li class="am-active"><a href="#tab1">基本信息</a></li>
					</ul>
					<div class="am-tabs-bd">
						<div class="am-tab-panel am-fade am-in am-active" id="tab1">
							<div class="am-g am-margin-top">
			<div class="am-u-sm-1 am-u-md-1 am-text-right">
              	业务员姓名
            </div>
            <div class="am-u-sm-5 am-u-md-5">
            	<input type="text" class="am-input-sm" name="name" id="name" value="${name}">
            </div>
              <div class="am-u-sm-1 am-u-md-1 am-text-right">
              	店铺名
            </div>
            <div class="am-u-sm-5 am-u-md-5">
            	<input type="text" class="am-input-sm" name="shopname" id="shopname" value="${shopname}">
            </div>
            
            </div>
            
            <div class="am-g am-margin-top">	
			<div class="am-margin am-text-right">
			<button type="button" id="clear_button"
				class="am-btn am-btn-primary am-btn-xs">清空</button>
			<button type="button" id="search_button"
				class="am-btn am-btn-primary am-btn-xs">查询</button>
			</div>
			</div>
			</div>
			
			</div>							
			</form>
			
			<div class="am-g">
	<div class="am-u-sm-12">
		<form class="am-form">
			<table id="clients_table"
				class="am-table am-table-striped am-table-hover table-main">
				<thead>
					<tr>
						<th class="table-title" width="5%">业务员姓名</th>
						<th class="table-title" width="5%">店铺名</th>
						<th class="table-title" width="10%">经度</th>
						<th class="table-title" width="10%">纬度</th>
						
						<th class="table-title" width="10%">查看地图</th>
						<th class="table-title" width="10%">是否为面谈</th>
						<th class="table-title" width="10%">是否为店长</th>									
						<th class="table-title" width="8%">是否签单</th>									
						<th class="table-title" width="10%">时间</th>
															
						<th class="table-title" width="5%">状态</th>
						<th class="table-title" width="7%">关联状态</th>
						<th class="table-title" width="10%">地址</th>
					</tr>
				</thead>
				<tbody>

					<c:forEach var="businesslist" items="${businesslists}" varStatus="b">
						<tr class="tr_click" businesslist_id="${businesslist.id}">
							<td>${businesslist.adminuser.name}</td>
							<td>${businesslist.shopname}</td>
							<td id="td_address_x" address_x="${businesslist.address_x}">${businesslist.address_x}</td>
							<td id="td_address_y" address_y="${businesslist.address_y}">${businesslist.address_y}</td>
							<!-- <td><button type="button" id="button">查看</button></td> -->
							<td><a href="views/business/get_map.jsp?x=${businesslist.address_x}&y=${businesslist.address_y}&shopname=${businesslist.shopname}" target="_blank">查看</a></td>
							
							<td>
						<c:if test="${businesslist.is_interview==0}">
						  非
						</c:if>
						<c:if test="${businesslist.is_interview==1}">
						  是
						</c:if></td>
							<td>
						<c:if test="${businesslist.is_shopowner==0}">
						  非
						</c:if>
						<c:if test="${businesslist.is_shopowner==1}">
						  是
						</c:if></td>
							<td>
						<c:if test="${businesslist.is_writen==0}">
						  非
						</c:if>
						<c:if test="${businesslist.is_writen==1}">
						 是
						</c:if></td>
							<td>${businesslist.create_time}</td>
							<td status="${businesslist.status}" id="td_status">
						<c:if test="${businesslist.status==0}">
						  禁用
						</c:if>
						<c:if test="${businesslist.status==1}">
						  可用
						</c:if></td>
						
						<td>
						<c:if test="${businesslist.is_relation==0}">
						 不关联
						</c:if>
						<c:if test="${businesslist.is_relation==1}">
						  关联
						</c:if></td>
						<td>
						${businesslist.province.name}-${businesslist.city.name}-${businesslist.county.name}
						</td>				
						</tr>
					</c:forEach>
				</tbody>
			</table>
			
			<div class="am-cf">
				共 ${page.allRow} 条记录
				<div class="am-fr">
					<ul class="am-pagination">
						<c:choose>
							<c:when test="${page.currentPage==1}">
								<li class="am-disabled"><a href="#">«</a></li>
							</c:when>
							<c:when test="${page.currentPage!=1}">
								<li><a href="javascript:void(0)"
									onclick="choose_page(${page.currentPage-1})">«</a></li>
							</c:when>
						</c:choose>
						<c:forEach var="i" begin="1" end="${page.totalPage}" step="1">
							<c:choose>
								<c:when test="${page.currentPage==i}">
									<li class="am-active"><a href="javascript:void(0)"><c:out
												value="${i}" /></a></li>
								</c:when>
								<c:when test="${page.currentPage!=i}">
									<li><a href="javascript:void(0)"
										onclick="choose_page(${i})"><c:out value="${i}" /></a></li>
								</c:when>
							</c:choose>
						</c:forEach>
						<c:choose>
							<c:when test="${page.currentPage==page.totalPage}">
								<li class="am-disabled"><a href="#">»</a></li>
							</c:when>
							<c:when test="${page.currentPage!=page.totalPage}">
								<li><a href="javascript:void(0)"
									onclick="choose_page(${page.currentPage+1})">»</a></li>
							</c:when>
						</c:choose>
						</ul>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>

		<!-- content end -->

	</div>

	<a href="#" class="am-show-sm-only admin-menu"
		data-am-offcanvas="{target: '#admin-offcanvas'}"> <span
		class="am-icon-btn am-icon-th-list"></span>
	</a>

	<jsp:include page="/manage_foot.do" flush="true" />

	<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->

	<!--[if (gte IE 9)|!(IE)]><!-->
	<script src="assets/js/jquery.min.js"></script>
	<!--<![endif]-->
	<script src="assets/js/amazeui.min.js"></script>
	<script src="assets/js/app.js"></script>
	<script type="text/javascript">
$(function() {
	//清空按钮点击事件
	 $("#clear_button").click(function(){
		 //$(".tr_click").removeClass("am-active");
		 $("#businesslist_id").val(0);
		 $('#business_form')[0].reset();
		 $("#name").val('');
		 $("#shopname").val('');
	 });
	//查询按钮点击事件
	 $("#search_button").click(function(){
		 
		 $("#business_form").submit();
	  //   $("#clear_button").show();
	 });
});
function choose_page(i){
	 $("#clear_button").click();
	$("#page_num").val(i);
	$("#business_form").submit();
	}

</script>
</body>
</html>
